
#添加配置 
SET(CMAKE_SYSTEM_NAME Linux)
#告诉cmake是进行交叉编译
SET(CMAKE_CROSSCOMPILING TRUE)
SET(TOOLCHAIN_PATH /opt/gcc-arm-none-linux-gnueabihf-9.2-2019.12-x86_64)
SET(CMAKE_C_COMPILER ${TOOLCHAIN_PATH}/bin/arm-none-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_PATH}/bin/arm-none-linux-gnueabihf-g++)
#SET(TOOLCHAIN_PATH /opt/fsl-imx-x11/sysroots/x86_64-pokysdk-linux)
#SET(CMAKE_C_COMPILER arm-poky-linux-gnueabi-gcc)
#ET(CMAKE_CXX_COMPILER arm-poky-linux-gnueabi-g++)
SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_PATH})
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

add_compile_options(-march=armv7-a)
add_compile_options(-mfpu=neon)
add_compile_options(-mfloat-abi=hard)
#add_compile_options(-mcpu=cortex-a9)

